function [Mdl, score] = trainSVM(pred, resp)

%Train an SVM classifier on the [pred(X) resp(y)] data. Standardize the data.
Mdl = fitcsvm(pred, resp, 'Standardize', true);

% Compute the posterior probabilities (scores)
Mdl = fitPosterior(Mdl);

% The second column of score contains the posterior probabilities
[~, score] = resubPredict(Mdl);     
end